package com.gagakuai.bpm.common.exception;


import com.gagakuai.bpm.common.enums.BusinessCodeEnum;
import lombok.Data;
import org.springframework.http.HttpStatus;

/*
 * @program: mss_server
 * @description: bpm异常
 * @author: houhong
 * @create: 2022-03-29 12:51
 */
@Data
public class BpmException extends RuntimeException {

    private BusinessCodeEnum codeEnum;

    private Integer status = 400;

    public BpmException(String msg) {
        super(msg);
    }

    public BpmException(HttpStatus status, String msg) {
        super(msg);
        this.status = status.value();
    }

    public BpmException(int code, String msg) {
        super(msg);
        this.status = code;
    }

    public BpmException(BusinessCodeEnum businessCodeEnum) {

        this.codeEnum = businessCodeEnum;
    }
}